﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="BillingLoadDetailRptList.aspx.cs"  EnableEventValidation="false" Inherits="WMS6.Web.Analytics.BillingLoadDetailRptList" meta:resourcekey="Page" %>

<%@ PreviousPageType VirtualPath="~/Analytics/BillingLoadDetailRptQuery.aspx" %>
<%@ Register Src="../UserControls/Pager.ascx" TagName="Pager" TagPrefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>BillingLoadDetailRptList</title>
    <link href="../style/zh/1/css.css" type="text/css" rel="Stylesheet" id="mycss" />
    <link href="../Css/style.css" type="text/css" rel="stylesheet" />

    <script src="../Js/jquery.js" type="text/javascript"></script>

    <script src="../Js/jquery.simplemodal.js" type="text/javascript"></script>

    <script src="../Js/util.js" type="text/javascript"></script>

    <script src="../Js/InitPage.js" type="text/javascript"></script>

    <script src="../Js/checkbox.js" type="text/javascript"></script>

    <script type="text/javascript">
    
      window.onload = function(){
            initListPage();
        }
        
        function returnSearch()
        {
        
            window.location.href = "BillingLoadDetailRptQuery.aspx";
//            var from = document.getElementById("hdnFrom").value;
//            if(from != "")
//            {
//                window.location.href = "BillingLoadDetailRptQuery.aspx";
//            }
//            else
//            {
//                window.history.go(-1);
//            }
        }
        
        //显示 报表 DIV
		function showReport()
		{	
			var pos = getElementPos("htmlbtnReport");	
			document.getElementById("reportDiv").style.top = pos.y+17;
			document.getElementById("reportDiv").style.left = pos.x;  			
			document.getElementById("hiddenReportFlag").value = '1';
		}
		
		//隐藏 报表 DIV
		function hiddenReportDiv()
		{
			var flag = document.getElementById("hiddenReportFlag").value
			if(flag == "1")
			{
				document.getElementById("reportDiv").style.display = "block";
				document.getElementById("hiddenReportFlag").value = '0';
			}
			else 
			{
				document.getElementById("reportDiv").style.display = "none";
			}
		}
        
        //弹出 打印费用 的窗口
        function popPrintBillReceive() {
            window.open('../Common/PrintReport.aspx?rtype=PrintBillingLoadDetailReceive&pa='+escape(document.getElementById("hdnPara").value), 'PrintWindow', 'width=860,height=610,top=50,left=50,toolbar=no,menubar=no,scrollbars=yes, resizable=yes,location=no,status=no');
        }
        
        //弹出 打印费用 的窗口
        function popPrintBillPayment() {
            window.open('../Common/PrintReport.aspx?rtype=PrintBillingLoadDetailPayment&pa='+escape(document.getElementById("hdnPara").value), 'PrintWindow', 'width=860,height=610,top=50,left=50,toolbar=no,menubar=no,scrollbars=yes, resizable=yes,location=no,status=no');
        }

    </script>

</head>
<body>
    <form id="F15641" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server" />
        <div id="div_List_top">
            <table>
                <tr>
                    <td valign="bottom">
                        <asp:Label ID="lblBillingLoadList" runat="server" CssClass="label_header" Text="装卸费用清单报告"
                            meta:resourcekey="lblBillingLoadList"></asp:Label>
                    </td>
                    <td>
                        <asp:Button ID="btnRefresh" runat="server" CssClass="button" Enabled="False" Text="<%$ Resources:ButtonResource,btnRefresh %>"
                            OnClick="btnRefresh_Click" meta:resourcekey="btnRefreshResource1" />
                    </td>
                    <td>
                        <input id="htmlbtnReport" type="button" runat="server" value="<%$Resources:ButtonResource,btnReport%>"
                            class="button" onclick="showReport();" />
                    </td>
                </tr>
            </table>
        </div>
        <div class="blank8">
        </div>
        <asp:UpdatePanel ID="up1" runat="server">
            <ContentTemplate>
                <div id="div_List">
                    <div id="div_List_msg">
                        <asp:Label ID="lblMsg" runat="server" CssClass="label_message" 
                            meta:resourcekey="lblMsgResource1"></asp:Label>
                    </div>
                    <asp:GridView ID="gvBillingLoadDetailFrom" runat="server" AutoGenerateColumns="False" AllowSorting="True"
                        CssClass="gridview" OnRowDataBound="gvBillingLoadDetailFrom_RowDataBound" OnSorting="gvBillingLoadDetailFrom_Sorting"
                        DataKeyNames="CREDENCE_DOC_TYPE,DOC_ID,DUE_FROM_TO,COST_TYPE,CHARGE_UNIT,REMARK,DOC_TYPE_D,EXTERNAL_DOC_ID,
                        WORK_TYPE_D,WORK_CLASS_D,FORKLIFT_DRIVER_D,EQUIPMENT_PROFILE_D,IS_HOLIDAY,CREATED_DATE,COST_TYPE_D,CHARGE_UNIT_D,
                        QUANTITY,TOTAL_GROSS_WEIGHT,FIXED_RATE,BILLING_AMOUNT" PageSize="20" Width="1500px" OnInit="gvBillingLoadDetailFrom_Init"
                        meta:resourcekey="gvBillingLoadDetailFrom">
                        <FooterStyle CssClass="GridViewFooterStyle" />
                        <RowStyle CssClass="GridViewRowStyle" />
                        <HeaderStyle CssClass="GridViewHeaderStyle" />
                        <AlternatingRowStyle CssClass="GridViewAlternatingRowStyle" />
                        <Columns>
                            <asp:BoundField HeaderText="序号" FooterText="序号" meta:resourcekey="BoundField">
                                <ItemStyle CssClass="GridViewRowWidth_40" />
                            </asp:BoundField>
                            <asp:TemplateField meta:resourcekey="TemplateField">
                                <HeaderTemplate>
                                    <img src="../Images/gvSettingpic.gif" id="img01" class="gvSettingImg" onclick="gvUserSetting('15641','gvBillingLoadDetailFrom');"
                                        onmouseover="showGVUserSettingAlt(this);" alt="customize list" />
                                    <asp:CheckBox ID="CheckBox1" runat="server" onclick="selectAll(this,'gvBillingLoadDetailFrom');"
                                        meta:resourcekey="CheckBox1" />
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <asp:CheckBox ID="chbSelect" runat="server"  meta:resourcekey="chbSelect" />
                                </ItemTemplate>
                                <FooterTemplate>
                                    <asp:CheckBox ID="CheckBox2" runat="server" onclick="selectAll(this,'gvBillingLoadDetailFrom');"
                                        meta:resourcekey="CheckBox2" />
                                </FooterTemplate>
                                <HeaderStyle HorizontalAlign="Center" CssClass="GridViewRowWidth_50" />
                                <ItemStyle HorizontalAlign="Center" CssClass="GridViewRowWidth_50" />
                            </asp:TemplateField>
                            <asp:BoundField DataField="DOC_TYPE_D" HeaderText="单据类型" FooterText="单据类型" SortExpression="DOC_TYPE_D"
                                meta:resourcekey="DOC_TYPE_D">
                                <ItemStyle CssClass="GridViewRowWidth_100" />
                            </asp:BoundField>
                            <asp:BoundField DataField="DOC_ID" HeaderText="系统单号" FooterText="系统单号" SortExpression="DOC_ID"
                                meta:resourcekey="DOC_ID">
                                <ItemStyle CssClass="GridViewRowWidth_100" />
                            </asp:BoundField>
                            <asp:BoundField DataField="EXTERNAL_DOC_ID" HeaderText="外部订单号" FooterText="外部订单号" SortExpression="EXTERNAL_DOC_ID"
                                meta:resourcekey="EXTERNAL_DOC_ID">
                                <ItemStyle CssClass="GridViewRowWidth_100" />
                            </asp:BoundField>
                            
                            <asp:BoundField DataField="IS_HOLIDAY" HeaderText="节假日" FooterText="节假日" SortExpression="IS_HOLIDAY"
                                meta:resourcekey="IS_HOLIDAY">
                                <ItemStyle CssClass="GridViewRowWidth_100" />
                            </asp:BoundField>
                            
                            <asp:BoundField DataField="CREATED_DATE" HeaderText="制单日期" FooterText="制单日期" SortExpression="CREATED_DATE"
                                meta:resourcekey="CREATED_DATE">
                                <ItemStyle CssClass="GridViewRowWidth_100" />
                            </asp:BoundField>
                            
                            <asp:BoundField DataField="COST_TYPE_D" HeaderText="费用名称" FooterText="费用名称" SortExpression="COST_TYPE_D"
                                meta:resourcekey="COST_TYPE_D">
                                <ItemStyle CssClass="GridViewRowWidth_100" />
                            </asp:BoundField>
                            
                            <asp:BoundField DataField="CHARGE_UNIT_D" HeaderText="计费单位" FooterText="计费单位" SortExpression="CHARGE_UNIT_D"
                                meta:resourcekey="CHARGE_UNIT_D">
                                <ItemStyle CssClass="GridViewRowWidth_100" />
                            </asp:BoundField>

                            <asp:BoundField DataField="QUANTITY" HeaderText="件数" FooterText="件数" SortExpression="QUANTITY"
                                meta:resourcekey="QUANTITY">
                                <ItemStyle CssClass="GridViewRowWidth_100" />
                            </asp:BoundField>
                            
                            <asp:BoundField DataField="TOTAL_GROSS_WEIGHT" HeaderText="重量" FooterText="重量" SortExpression="TOTAL_GROSS_WEIGHT"
                                meta:resourcekey="TOTAL_GROSS_WEIGHT">
                                <ItemStyle CssClass="GridViewRowWidth_100" />
                            </asp:BoundField>
                            
                            <asp:BoundField DataField="FIXED_RATE" HeaderText="费率" FooterText="费率" SortExpression="FIXED_RATE"
                                meta:resourcekey="FIXED_RATE">
                                <ItemStyle CssClass="GridViewRowWidth_100" />
                            </asp:BoundField>
                            
                            <asp:TemplateField FooterText="金额" HeaderText="金额" SortExpression="BILLING_AMOUNT"
                                meta:resourcekey="BILLING_AMOUNT">
                                <ItemTemplate>
                                    <asp:Label ID="lblAmount" runat="server" Text='<%# Eval("BILLING_AMOUNT").ToString() %>'
                                        meta:resourcekey="lblAmount"></asp:Label>
                                </ItemTemplate>
                                <ItemStyle CssClass="GridViewRowWidth_100" />
                            </asp:TemplateField>  
                            <asp:BoundField DataField="REMARK" HeaderText="备注" FooterText="备注" SortExpression="REMARK"
                                meta:resourcekey="REMARK">
                                <ItemStyle CssClass="GridViewRowWidth_100" />
                            </asp:BoundField>
                            <asp:BoundField DataField="IS_PRINTED" HeaderText="是否打印" FooterText="是否打印" SortExpression="IS_PRINTED"
                                meta:resourcekey="IS_PRINTED">
                                <ItemStyle CssClass="GridViewRowWidth_100" />
                            </asp:BoundField>                 
                        </Columns>
                    </asp:GridView>
                    
                    <asp:GridView ID="gvBillingLoadDetailTo" runat="server" AutoGenerateColumns="False" AllowSorting="True"
                        CssClass="gridview" OnRowDataBound="gvBillingLoadDetailTo_RowDataBound" OnSorting="gvBillingLoadDetailTo_Sorting"
                        DataKeyNames="CREDENCE_DOC_TYPE,DOC_ID,DUE_FROM_TO,COST_TYPE,CHARGE_UNIT,REMARK,DOC_TYPE_D,EXTERNAL_DOC_ID,
                        WORK_TYPE_D,WORK_CLASS_D,FORKLIFT_DRIVER_D,EQUIPMENT_PROFILE_D,IS_HOLIDAY,CREATED_DATE,COST_TYPE_D,CHARGE_UNIT_D,
                        QUANTITY,TOTAL_GROSS_WEIGHT,FIXED_RATE,BILLING_AMOUNT" PageSize="20" Width="1800px" OnInit="gvBillingLoadDetailTo_Init"
                        meta:resourcekey="gvBillingLoadDetailTo">
                        <FooterStyle CssClass="GridViewFooterStyle" />
                        <RowStyle CssClass="GridViewRowStyle" />
                        <HeaderStyle CssClass="GridViewHeaderStyle" />
                        <AlternatingRowStyle CssClass="GridViewAlternatingRowStyle" />
                        <Columns>
                            <asp:BoundField HeaderText="序号" FooterText="序号" meta:resourcekey="BoundField">
                                <ItemStyle CssClass="GridViewRowWidth_40" />
                            </asp:BoundField>
                            <asp:TemplateField meta:resourcekey="TemplateField">
                                <HeaderTemplate>
                                    <img src="../Images/gvSettingpic.gif" id="img01" class="gvSettingImg" onclick="gvUserSetting('15641','gvBillingLoadDetailTo');"
                                        onmouseover="showGVUserSettingAlt(this);" alt="customize list" />
                                    <asp:CheckBox ID="CheckBox1" runat="server" onclick="selectAll(this,'gvBillingLoadDetailTo');"
                                        meta:resourcekey="CheckBox1" />
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <asp:CheckBox ID="chbSelect" runat="server"  meta:resourcekey="chbSelect" />
                                </ItemTemplate>
                                <FooterTemplate>
                                    <asp:CheckBox ID="CheckBox2" runat="server" onclick="selectAll(this,'gvBillingLoadDetailTo');"
                                        meta:resourcekey="CheckBox2" />
                                </FooterTemplate>
                                <HeaderStyle HorizontalAlign="Center" CssClass="GridViewRowWidth_50" />
                                <ItemStyle HorizontalAlign="Center" CssClass="GridViewRowWidth_50" />
                            </asp:TemplateField>
                            <asp:BoundField DataField="DOC_TYPE_D" HeaderText="单据类型" FooterText="单据类型" SortExpression="DOC_TYPE_D"
                                meta:resourcekey="DOC_TYPE_D">
                                <ItemStyle CssClass="GridViewRowWidth_100" />
                            </asp:BoundField>
                            <asp:BoundField DataField="DOC_ID" HeaderText="系统单号" FooterText="系统单号" SortExpression="DOC_ID"
                                meta:resourcekey="DOC_ID">
                                <ItemStyle CssClass="GridViewRowWidth_100" />
                            </asp:BoundField>
                            <asp:BoundField DataField="EXTERNAL_DOC_ID" HeaderText="外部订单号" FooterText="外部订单号" SortExpression="EXTERNAL_DOC_ID"
                                meta:resourcekey="EXTERNAL_DOC_ID">
                                <ItemStyle CssClass="GridViewRowWidth_100" />
                            </asp:BoundField>
                            
                            <asp:BoundField DataField="WORK_TYPE_D" HeaderText="作业类型" FooterText="作业类型" SortExpression="WORK_TYPE_D" 
                                meta:resourcekey="WORK_TYPE_D">
                                <ItemStyle CssClass="GridViewRowWidth_100" />
                            </asp:BoundField>
                            
                            <asp:BoundField DataField="WORK_CLASS_D" HeaderText="作业班次" FooterText="作业班次" SortExpression="WORK_CLASS_D"
                                meta:resourcekey="WORK_CLASS_D">
                                <ItemStyle CssClass="GridViewRowWidth_100" />
                            </asp:BoundField>
                            
                            <asp:BoundField DataField="FORKLIFT_DRIVER_D" HeaderText="叉车司机" FooterText="叉车司机" SortExpression="FORKLIFT_DRIVER_D"
                                meta:resourcekey="FORKLIFT_DRIVER_D">
                                <ItemStyle CssClass="GridViewRowWidth_100" />
                            </asp:BoundField>
                            
                            <asp:BoundField DataField="EQUIPMENT_PROFILE_D" HeaderText="叉车号" FooterText="叉车号" SortExpression="EQUIPMENT_PROFILE_D"
                                meta:resourcekey="EQUIPMENT_PROFILE_D">
                                <ItemStyle CssClass="GridViewRowWidth_100" />
                            </asp:BoundField>
                            
                            
                            <asp:BoundField DataField="IS_HOLIDAY" HeaderText="节假日" FooterText="节假日" SortExpression="IS_HOLIDAY"
                                meta:resourcekey="IS_HOLIDAY">
                                <ItemStyle CssClass="GridViewRowWidth_100" />
                            </asp:BoundField>
                            
                            <asp:BoundField DataField="CREATED_DATE" HeaderText="制单日期" FooterText="制单日期" SortExpression="CREATED_DATE"
                                meta:resourcekey="CREATED_DATE">
                                <ItemStyle CssClass="GridViewRowWidth_100" />
                            </asp:BoundField>
                            
                            <asp:BoundField DataField="COST_TYPE_D" HeaderText="费用名称" FooterText="费用名称" SortExpression="COST_TYPE_D"
                                meta:resourcekey="COST_TYPE_D">
                                <ItemStyle CssClass="GridViewRowWidth_100" />
                            </asp:BoundField>
                            
                            <asp:BoundField DataField="CHARGE_UNIT_D" HeaderText="计费单位" FooterText="计费单位" SortExpression="CHARGE_UNIT_D"
                                meta:resourcekey="CHARGE_UNIT_D">
                                <ItemStyle CssClass="GridViewRowWidth_100" />
                            </asp:BoundField>
                            
                            
                            <asp:BoundField DataField="QUANTITY" HeaderText="件数" FooterText="件数" SortExpression="QUANTITY"
                                meta:resourcekey="QUANTITY">
                                <ItemStyle CssClass="GridViewRowWidth_100" />
                            </asp:BoundField>
                            
                            <asp:BoundField DataField="TOTAL_GROSS_WEIGHT" HeaderText="重量" FooterText="重量" SortExpression="TOTAL_GROSS_WEIGHT"
                                meta:resourcekey="TOTAL_GROSS_WEIGHT">
                                <ItemStyle CssClass="GridViewRowWidth_100" />
                            </asp:BoundField>
                            
                            <asp:BoundField DataField="FIXED_RATE" HeaderText="费率" FooterText="费率" SortExpression="FIXED_RATE"
                                meta:resourcekey="FIXED_RATE">
                                <ItemStyle CssClass="GridViewRowWidth_100" />
                            </asp:BoundField>
                            
                            <asp:TemplateField FooterText="金额" HeaderText="金额" SortExpression="BILLING_AMOUNT"
                                meta:resourcekey="BILLING_AMOUNT">
                                <ItemTemplate>
                                    <asp:Label ID="lblAmount" runat="server" Text='<%# Eval("BILLING_AMOUNT").ToString() %>'
                                        meta:resourcekey="lblAmount"></asp:Label>
                                </ItemTemplate>
                                <ItemStyle CssClass="GridViewRowWidth_100" />
                            </asp:TemplateField>  
                            <asp:BoundField DataField="REMARK" HeaderText="备注" FooterText="备注" SortExpression="REMARK"
                                meta:resourcekey="REMARK">
                                <ItemStyle CssClass="GridViewRowWidth_100" />
                            </asp:BoundField>
                             <asp:BoundField DataField="IS_PRINTED" HeaderText="是否打印" FooterText="是否打印" SortExpression="IS_PRINTED"
                                meta:resourcekey="IS_PRINTED">
                                <ItemStyle CssClass="GridViewRowWidth_100" />
                            </asp:BoundField>                 
                        </Columns>
                    </asp:GridView>
                    
                    <div>
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                            <tr style="height: 10px">
                                <td>
                                </td>
                            </tr>
                            <tr>
                                <td class="Result_01">
                                    总计：
                                </td>
                                <td class="Result_02">
                                    <table>
                                        <tr>
                                            <td style="margin-right: 20px;">
                                                &nbsp; &nbsp;
                                            </td>
                                                <td>
                                                <asp:Label ID="lblAllTotalAmount" runat="server" Text="总金额:" class="label" 
                                                        meta:resourcekey="lblAllTotalAmountResource1"></asp:Label>
                                                <asp:Label ID="lblAllTotalAmountText" runat="server" class="label" 
                                                        Style="margin-right: 10px;" meta:resourcekey="lblAllTotalAmountText"></asp:Label>
                                            </td>
                                            
                                        </tr>
                                    </table>
                                </td>
                                <td class="Result_03">
                                </td>
                            </tr>
                            <tr style="height: 20px">
                                <td>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
                <div id="div_pager">
                    <uc1:Pager ID="PagerFooter" runat="server" OnFirst="btnFirst_Click" OnPrevious="btnPrevious_Click"
                        OnNext="btnNext_Click" OnLast="btnLast_Click" OnGoTo="GoTo_Click" />
                </div>
                <input type="hidden" runat="server" id="hdnFrom" />
            </ContentTemplate>
            <Triggers>
                <asp:AsyncPostBackTrigger ControlID="btnList" EventName="Click" />
                <asp:AsyncPostBackTrigger ControlID="btnRefresh" EventName="Click" />
            </Triggers>
        </asp:UpdatePanel>
        <input type="hidden" id="hdnActionID" runat="server" />
        <div id="div_List_bottom">
            <table>
                <tr>
                    <td>
                        <asp:Button ID="btnSearch" runat="server" Text="<%$ Resources:ButtonResource,btnNewSearch %>"
                            CssClass="button" Enabled="False" 
                            OnClientClick="javascript:window.location.href='BillingLoadDetailRptQuery.aspx';return false;" 
                            meta:resourcekey="btnSearchResource1" />
                    </td>
                    <td>
                        <asp:Button ID="btnReSearch" runat="server" Text="<%$ Resources:ButtonResource,btnReSearch %>"
                            CssClass="button" Enabled="False" 
                            OnClientClick="javascript:returnSearch();return false;" 
                            meta:resourcekey="btnReSearchResource1" />
                    </td>
                    <td>
                        <asp:Button ID="btnList" runat="server" Text="<%$ Resources:ButtonResource,btnList %>"
                            CssClass="button" Enabled="False" OnClick="btnList_Click" 
                            meta:resourcekey="btnListResource1" />
                    </td>
                    <td>
                        <asp:Button ID="btnExport" runat="server" Text="<%$ Resources:ButtonResource,btnExport %>"
                            CssClass="button" Enabled="False" OnClick="btnExport_Click" 
                            meta:resourcekey="btnExportResource1" />
                    </td>
                </tr>
            </table>
        </div>
    </div>
    
    <div id="reportDiv" style="background-color: #FFFFFF; position: absolute; display: none;">
        <table width="105" border="0" cellspacing="0" cellpadding="0" id="divcontent_menu2">
            <tr class="bg2" onmouseover="this.className='bg1'" onmouseout="this.className='bg2'">
                <td class="line" id="tdlnkbtnPrintReceivableBill" runat="server" visible="true">
                    <asp:LinkButton ID="lnkbtnPrintReceivableBill" runat="server" Text="<%$Resources:ButtonResource,lnkbtnPrintReceivableBill%>"
                        OnClick="lnkbtnPrintReceivableBill_Click"></asp:LinkButton>
                </td>
            </tr>
            <tr class="bg2" onmouseover="this.className='bg1'" onmouseout="this.className='bg2'">
                <td class="line" id="tdlnkbtnPrintPaymentBill" runat="server" visible="true">
                    <asp:LinkButton ID="lnkbtnPrintPaymentBill" runat="server" Text="<%$Resources:ButtonResource,lnkbtnPrintPaymentBill%>"
                        OnClick="lnkbtnPrintPaymentBill_Click"></asp:LinkButton>
                </td>
            </tr>
        </table>
    </div>
    <input type="hidden" id="hiddenFlag" />
    <input id="hiddenReportFlag" type="hidden" />
    <input type="hidden" id="hdnDueFromTo" runat="server" />
    <input type="hidden" id="hdnPara" runat="server" />
    </form>
</body>
</html>

<script language="javascript" type="text/javascript" event="onclick" for="document">
		<!--
		    hiddenReportDiv();
		//-->
</script>